package com.luoran.bartalks.dao;

import java.util.List;

import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.core.mapper.BaseMapper;

import com.luoran.bartalks.entity.BaseInfo;
import com.luoran.bartalks.entity.biz.BtMateriel;

public interface IBtMaterielDao extends BaseMapper<BtMateriel> {

	void queryPage(PageQuery<? extends BaseInfo> pageQuery);

	// 根据物料类型ID查询物料
	List<BtMateriel> getMaterielByTypeId(@Param("companyId") String companyId, @Param("typeId") String typeId);

	// 根据物料编码查询物料
	BtMateriel getMaterielByMaterielCode(@Param("materielCode") String materielCode,
			@Param("companyId") String companyId);

	// 扫描货物时需要根据货物id和公司id校验货物
	BtMateriel getBtMaterielByIdAndCompanyId(@Param("id") String materielId, @Param("companyId") String companyId);

	// 根据计划途经点id查询物料用于工作台展示
	List<BtMateriel> getMaterielByPlanEntryIdOfReport(@Param("planEntryId") String planEntryId,
			@Param("startRow") int startRow, @Param("type") String type);

}
